<!-- /components/header.php -->

<header class="header">
    <img src="/assets/logo.png" alt="logo" class="logo-img">
    <span class="header-title">工会留言板后台</span>
    <div class="header-user">
        <?php if (!empty($_SESSION['admin_user'])): ?>
            <span class="admin-name"><?php echo htmlspecialchars($_SESSION['admin_user']); ?></span>
            <a href="/admin/logout.php" class="logout-btn">退出</a>
        <?php endif; ?>
    </div>
</header>
